﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Collection.Export.Interface
{
    /// <summary>
    /// 数据导出接口
    /// </summary>
    /// <typeparam name="T">事件参数类型</typeparam>
    public interface IImportService<R> where R : class
    {
        /// <summary>
        ///数据库插入事件
        /// </summary>
        event Action<R> Insert;

        /// <summary>
        /// 数据库更新事件
        /// </summary>
        event Action<R> Update;

        /// <summary>
        /// 导出接口
        /// </summary>
        /// <param name="obj">当前要导出的对象</param>
        /// <returns>返回导出对象</returns>
        R Import(R obj);
    }
}
